<?php
if($user_info!=false){
    $user_id=$user_info["id"];
    $user_token=$user_info["token"];
}
$product_id=$product_config["id"];
if(mysqli_query($conn, "INSERT INTO `blue_service`(`user_id`, `product_id`, `time`, `appid`, `long`, `token`, `admin`,`times`) VALUES ('$user_id', '$product_id', '".time()."', '".hash("sha256",time().$user_id)."', '0', '$user_token', '$admin','".preg_replace('/[^0-9]/', '', $_REQUEST["number"])."')")){
$money = floatval($user_info["money"])-floatval($product_config["money"])*$_REQUEST["number"];
   mysqli_query($conn, "UPDATE `blue_user` SET `money`='$money' WHERE `id`='$user_id'");
    $return = array('code'=>200);
    die(json_encode($return));
}


?>